<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="../base.jsp" %> 
<sys:genericTag4o 
	methodName="queryCategory1All" 
	className="com.wxy.controller.taglib.CategoryTag" 
	id="categoryDtoList"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>	
<link href="../css/main.css" rel="stylesheet" type="text/css" >
<link rel="stylesheet" type="text/css" href="../../js/jquery/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../js/jquery/easyui/themes/icon.css">
<script type="text/javascript" src="../../js/jquery-1.8.0.min.js"></script>
<script src="../../js/jquery/easyui/jquery.easyui.min.js"></script>
<script src="../../js/jquery/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../js/jquery.select.js"></script>
<script type="text/javascript">
var datagrid={
	datagridId:"queryList",
	datagridUrl:"productAjax!queryProductBySearch.action",
	datagridObj:{
    	/*title:"查询列表",*/
		nowrap:true,
		autoRowHeight:false,
		fit:true,
		columns:[
			[
			 	{field:'productNum',title:'商品编号'},
			 	{field:'category1Name',title:'一级类别'},
			 	{field:'category2Name',title:'二级类别'},
			 	{field:'category3Name',title:'三级类别'},
			 	{field:'productName',title:'商品名称',width:100},
			 	{field:'productNameShow',title:'商品名称(网站)',width:100},
			 	{field:'marketPriceYuan',title:'市场价',width:50},
			 	{field:'productPriceYuan',title:'本网价',width:50},
			 	{field:'amountStore',title:'库存数量'},
			 	{field:'statusStr',title:'状态',width:50},
			 	{field:'recordDateStr',title:'录入日期',width:130},
			 	{field:'recordMan',title:'录入人'},
			 	{field:'lastChangeDateStr',title:'最后一次编辑日期',width:130},
			 	{field:'lastChangeMan',title:'最后一次编辑人'},
			 	{field:'remark1',title:'备注',width:150}
			]
		],
		frozenColumns:[[
		                {field:'cb',checkbox:true}
					]],
		toolbar:[
                 {
                     id:'queryProductDetail',
					 text:'选择一项查看详细信息',
					 iconCls:'icon-search',
					 handler:function(){
                		 queryProductDetail();
					 }
                  }
         ],
		rownumbers:true
	},
	datagridProperty:{
		productNum:'商品编号',
		productName:'商品名称',
		recordDateStart:'录入日期(起)',
		recordDateEnd:'录入日期(止)'
	},
	datagridPropertySort:{
		productId:'默认属性',
		recordDate:'录入日期'
	}
}
function queryProductDetail(){
	var rows = $('#queryList').datagrid('getSelections');
	if(rows.length!=1){
		alert('请选择一项数据进行查看');
		return false;
	}
	var productNum = rows[0].productNum;
	window.parent.Open('商品添加及编辑','product/productAdd1.jsp?productNum='+productNum); 
}
</script>

<style type="text/css">
	.west{
		width: 200px;
		padding: 3px;
	}
	.center{
		padding: 3px;
	}
</style>

</head>

<body class="easyui-layout" style="margin: 2px;">
	<div region="west" class="west" title="条件搜索">
        <jsp:include page="../condition.jsp"></jsp:include>
	</div>
	<div region="center" class="center" title="查询列表">
         <table id="queryList" width="100%" ></table>
	</div>
</body>

<!-- 
<body class="font14" >
<table>
	<tr>
		<td valign="top">
			<jsp:include page="../condition.jsp"></jsp:include>
		</td>
		<td width="100%" valign="top">
				<table id="queryList" width="100%" ></table>
		</td>
	</tr>
</table>
</body>
 -->
</html>